import state from "./state";

export default{
    isFullScreen(state){
      return state.isFullScreen;
    },
    isShowMiniPlayer(state){
      return state.isShowMiniPlyaer;
    },
    isPlaying(state){
      return state.isPlaying
    },
    modeType(state){
      return state.modeType
    },
    isShowListPlayer(state){
      return state.isShowListPlayer
    },
    songs  (state) {
      return state.songs
    },
    //获取当前播放歌曲
    currentSong  (state) {
      let obj = {
        name: '',
        singer: '',
        picUrl: null
      }
      if (state.songs.length !== 0) {
        obj = state.songs[state.currentIndex]
      }
      return obj
    },
    //获取当前播放歌曲歌词
    currentLyric(state){
      return state.currentLyric;
    },
    //获取播放列表中当前播放歌曲索引
    currentIndex(state){
      return state.currentIndex
    },
    //获取当前播放歌曲进度
    curTime(state){
      return state.curTime
    },
    //获取收藏的歌曲
    favoriteList(state){
      return state.favoriteList
    },
    //获取播放历史
    historyList(state){
      return state.historyList
    }
}